<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTestingUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_user', function (Blueprint $table) {
            $table->increments('id');
            $table->increments('uid');
            $table->string('openid')->nullable()->comment('openid');
            $table->string('nick_name')->nullable()->comment('用户昵称');
            $table->enum('sex',[0,1])->default(1)->comment('性别');
            $table->string('headimgurl')->nullable()->comment('用户头像');
            $table->string('province',100)->nullable()->comment('省份');
            $table->string('city',100)->nullable()->comment('城市');
            $table->string('country',100)->nullable()->comment('国家');
            $table->string('union_id')->nullable()->comment('公众平台的唯一id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_user');
    }
}
